<template>
  <div>
    <h1>注册</h1>
    <p>姓名：<input type="text" v-model="form.name"></p>
    <p>账号：<input type="text" v-model="form.username"></p>
    <p>密码：<input type="text" v-model="form.password"></p>
    <button @click="regi">注册</button>
  </div>
</template>

<script>
export default {
  name: "sregi",
  data() {
    return {
      form: {}
    }
  },
  methods: {
    regi() {
      this.$axios.post('table/user/', this.form)
        .then(res => {
          if (res.data.code == 200) {
            this.form = {}
            alert('注册成功')
          }
        })
    }
  }
}
</script>

<style scoped>

</style>
